package cc.uncarbon.module.appapi.web.app;

import cc.uncarbon.framework.web.model.response.ApiResult;
import cc.uncarbon.module.appapi.constant.AppApiConstant;
import cc.uncarbon.module.appapi.model.vo.StoreVO;
import cc.uncarbon.module.appapi.service.StoreService;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Tag(name = "小程序店铺管理")
@RequestMapping(AppApiConstant.HTTP_API_URL_PREFIX + "/api/v1")
@RequiredArgsConstructor
@RestController
@Slf4j
public class StoreIdController {
    private final StoreService storeService;

    @GetMapping("/store")
    public ApiResult<List<StoreVO>> getStoreList() {
        List<StoreVO> storeList = storeService.getStoreList();
        return ApiResult.data(storeList);
    }

}
